<!DOCTYPE html><html lang="zh-CN,en,default"><head hexo-theme="https://github.com/volantis-x/hexo-theme-volantis/tree/4.3.1"><meta charset="utf-8"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><meta name="HandheldFriendly" content="True"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><link rel="preload" href="/css/first.css" as="style"><title>IDEA手册 - Tang&#39;s blog.</title><meta name="keywords" content="IDEA"><meta name="description" content="IDEA 全称IntelliJ IDEA，是用于java语言开发的集成环境IDE(Integrated Development Environment)，也可用于其他语言。IntelliJ在业界被公认为最好的java开发工具之一，尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合..."><link rel="alternate" href="/atom.xml" title="Tang's blog." type="application/atom+xml"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/blog/favicon/browserconfig.xml"><meta name="theme-color" content="#ffffff"><link rel="apple-touch-icon" sizes="180x180" href="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/favicon/cf_1o_180x180.png"><link rel="icon" type="image/png" sizes="32x32" href="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/favicon/cf_1o_32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/favicon/cf_1o_16x16.png"><link rel="manifest" href="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/favicon/manifest2.json"><link rel="mask-icon" href="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/favicon/cf_image2vector.svg" color="#5bbad5"><link rel="shortcut icon" href="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/favicon/32favicon32.ico"><link rel="stylesheet" href="/css/first.css"><link rel="stylesheet" href="/css/style.css" media="print" onload='this.media="all",this.onload=null'><noscript><link rel="stylesheet" href="/css/style.css"></noscript><script id="loadcss"></script><script>window.MSInputMethodContext&&document.documentMode&&document.write('<style>html{overflow-x: hidden !important;overflow-y: hidden !important;}.kill-ie{text-align:center;height: 100%;margin-top: 15%;margin-bottom: 5500%;}</style><div class="kill-ie"><h1><b>抱歉，您的浏览器无法访问本站</b></h1><h3>微软已经于2016年终止了对 Internet Explorer (IE) 10 及更早版本的支持，<br/>继续使用存在极大的安全隐患，请使用当代主流的浏览器进行访问。</h3><br/><a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.microsoft.com/zh-cn/WindowsForBusiness/End-of-IE-support"><strong>了解详情 ></strong></a></div>')</script><noscript><style>html{overflow-x:hidden!important;overflow-y:hidden!important}.kill-noscript{text-align:center;height:100%;margin-top:15%;margin-bottom:5500%}</style><div class="kill-noscript"><h1><b>抱歉，您的浏览器无法访问本站</b></h1><h3>本页面需要浏览器支持（启用）JavaScript</h3><br> <a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.baidu.com/s?wd=启用JavaScript"><strong>了解详情 ></strong></a></div></noscript></head><body><header id="l_header" class="l_header always shadow blur show"><div class="container"><div id="wrapper"><div class="nav-sub"><p class="title"></p><ul class="switcher nav-list-h m-phone" id="pjax-header-nav-list"><li><a id="s-comment" class="fas fa-comments fa-fw" target="_self" href="javascript:void(0)" rel="external nofollow noreferrer"></a></li><li><a id="s-toc" class="s-toc fas fa-list fa-fw" target="_self" href="javascript:void(0)" rel="external nofollow noreferrer"></a></li></ul></div><div class="nav-main"> <a class="title flat-box" target="_self" href="/"><img no-lazy class="logo" src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/cover/fav/cf_o1x64.jpg"></a><div class="menu navigation"><ul class="nav-list-h m-pc"><li><a class="menuitem flat-box faa-parent animated-hover" href="/" id="home"><i class="fas fa-home fa-fw"></i> Home</a></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-th-list fa-fw"></i> Articles</a><ul class="list-v"><li><a class="menuitem flat-box faa-parent animated-hover" href="/categories/" id="categories"><i class="fas fa-folder-open fa-fw"></i> Categories</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/tags/" id="tags"><i class="fas fa-tags fa-fw"></i> Tags</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/archives/" id="archives"><i class="fas fa-archive fa-fw"></i> Archives</a></li></ul></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-fan faa-spin animated fa-fw"></i> Play</a><ul class="list-v"><li><a class="menuitem flat-box faa-parent animated-hover" href="/catchTheCat/" id="catchTheCat"><i class="fas fa-cat faa-wrench animated-hover fa-fw"></i> Chat Noir</a></li></ul></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-cog fa-spin fa-fw"></i> Tools</a><ul class="list-v"><li><a class="menuitem flat-box header toggle-mode-btn"><i class="fas fa-moon fa-fw"></i> 暗黑模式</a></li><li></li><li><a class="menuitem flat-box"><i class="fas fa-compact-disc fa-fw music"></i> Music</a><ul class="list-v"><li><div class="aplayer-container"><meting-js theme="#1BCDFC" autoplay="false" volume="0.7" loop="all" order="list" fixed="false" list-max-height="320px" server="netease" type="playlist" id="5472211102" list-folded="true"></meting-js></div></li></ul></li><li></li></ul></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-info-circle fa-fw"></i> Me</a><ul class="list-v"><li><a class="menuitem flat-box faa-parent animated-hover" href="/about/" id="about"><i class="fas fa-ellipsis-v fa-fw"></i> About</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="https://aner1001.gitee.io/resume/" target="_blank" id="https:aner1001giteeioresume"><i class="fas fa-clock fa-fw"></i> Resume</a></li></ul></li></ul></div><div id="tp-weather-widget"></div><script>!function(e,t,n,a,i,o,c,r){r=function(){o=t.createElement(n),c=t.getElementsByTagName(n)[0],o.src=i,o.charset="utf-8",o.async=1,c.parentNode.insertBefore(o,c)},e.SeniverseWeatherWidgetObject=a,e[a]||(e[a]=function(){(e[a].q=e[a].q||[]).push(arguments)}),e[a].l=+new Date,e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)}(window,document,"script","SeniverseWeatherWidget","//cdn.sencdn.com/widget2/static/js/bundle.js?t="+parseInt(((new Date).getTime()/1e8).toString(),10)),window.SeniverseWeatherWidget("show",{flavor:"slim",location:"WTW3SJ5ZBJUY",geolocation:!0,language:"zh-Hans",unit:"c",theme:"auto",token:"563a4097-8461-469b-ac30-123bac0010d1",hover:"enabled",container:"tp-weather-widget"})</script><div class="m_search"><form name="searchform" class="form u-search-form"><i class="icon fas fa-search fa-fw"></i> <input type="text" class="input u-search-input" placeholder="Search..."></form></div><ul class="switcher nav-list-h m-phone"><li><a class="s-search fas fa-search fa-fw" target="_self" href="javascript:void(0)" rel="external nofollow noreferrer"></a></li><li><a class="s-menu fas fa-bars fa-fw" target="_self" href="javascript:void(0)" rel="external nofollow noreferrer"></a><ul class="menu-phone list-v navigation white-box"><li><a class="menuitem flat-box faa-parent animated-hover" href="/" id="home"><i class="fas fa-home fa-fw"></i> Home</a></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-th-list fa-fw"></i> Articles</a><ul class="list-v"><li><a class="menuitem flat-box faa-parent animated-hover" href="/categories/" id="categories"><i class="fas fa-folder-open fa-fw"></i> Categories</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/tags/" id="tags"><i class="fas fa-tags fa-fw"></i> Tags</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/archives/" id="archives"><i class="fas fa-archive fa-fw"></i> Archives</a></li></ul></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-fan faa-spin animated fa-fw"></i> Play</a><ul class="list-v"><li><a class="menuitem flat-box faa-parent animated-hover" href="/catchTheCat/" id="catchTheCat"><i class="fas fa-cat faa-wrench animated-hover fa-fw"></i> Chat Noir</a></li></ul></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-cog fa-spin fa-fw"></i> Tools</a><ul class="list-v"><li><a class="menuitem flat-box header toggle-mode-btn"><i class="fas fa-moon fa-fw"></i> 暗黑模式</a></li><li></li></ul></li><li><a class="menuitem flat-box faa-parent animated-hover"><i class="fas fa-info-circle fa-fw"></i> Me</a><ul class="list-v"><li><a class="menuitem flat-box faa-parent animated-hover" href="/about/" id="about"><i class="fas fa-ellipsis-v fa-fw"></i> About</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="https://aner1001.gitee.io/resume/" target="_blank" id="https:aner1001giteeioresume"><i class="fas fa-clock fa-fw"></i> Resume</a></li></ul></li></ul></li></ul></div></div></div></header><div id="l_body"><div id="l_cover"><div id="full" class="cover-wrapper post blank" style="display:none"><div id="cover-backstretch"></div><div id="scroll-down" style="display:none"><i class="fa fa-chevron-down scroll-down-effects"></i></div></div></div><div id="safearea"><div class="body-wrapper" id="pjax-container"><div class="l_main"><article class="article post white-box reveal md shadow article-type-post" id="post" itemscope itemprop="blogPost"><div class="article-meta" id="top"><h1 class="title"> IDEA手册</h1><div class="new-meta-box"><div class="new-meta-item author"> <a class="author" href="/" rel="nofollow"><img no-lazy src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/img/cover/fav/cf_1o_x16.jpg"><p>汤晔飞</p></a></div><div class="new-meta-item category"><a class="notlink"><i class="fas fa-folder-open fa-fw" aria-hidden="true"></i> <a class="category-link" href="/categories/%E6%8A%80%E6%9C%AF%E7%9F%A5%E8%AF%86/">技术知识</a><span class="sep"></span><a class="category-link" href="/categories/%E6%8A%80%E6%9C%AF%E7%9F%A5%E8%AF%86/%E5%B7%A5%E5%85%B7/">工具</a></a></div><div class="new-meta-item date"><a class="notlink"><i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i><p>发布于：2021年2月3日</p></a></div><div class="new-meta-item browse leancloud"><a class="notlink"><div id="lc-pv" data-title="IDEA手册" data-path="/posts/2021/02/03/1a4c243e0505/"><i class="fas fa-eye fa-fw" aria-hidden="true"></i><span id="number"><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span> 次浏览</div></a></div></div></div><p>IDEA 全称IntelliJ IDEA，是用于java语言开发的集成环境IDE(Integrated Development Environment)，也可用于其他语言。IntelliJ在业界被公认为最好的java开发工具之一，尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的。</p><span id="more"></span><h2 id="1-概念"><a class="header-anchor" href="#1-概念">☀</a>1.概念</h2><h3 id="1-1-IDE"><a class="header-anchor" href="#1-1-IDE">☀</a>1.1 IDE</h3><blockquote><p>集成开发环境（IDE，Integrated Development Environment ）是用于提供程序开发环境的应用程序，一般包括代码编辑器、编译器、调试器和图形用户界面等工具。集成了代码编写功能、分析功能、编译功能、调试功能等一体化的开发软件服务套。所有具备这一特性的软件或者软件套（组）都可以叫集成开发环境。如微软的Visual Studio系列，Borland的C++ Builder、Delphi系列等。该程序可以独立运行，也可以和其它程序并用。IDE多被用于开发HTML应用软件。例如，许多人在设计网站时使用IDE（如HomeSite、DreamWeaver等），因为很多项任务会自动生成。编程开发软件将编辑、编译、调试等功能集成在一个桌面环境中,这样就大大方便了用户。</p><p>❀优点<br> 节省时间和精力。IDE的目的就是要让开发更加快捷方便，通过提供工具和各种性能来帮助开发者组织资源，减少失误，提供捷径。<br> 建立统一标准。当一组程序员使用同一个开发环境时，就建立了统一的工作标准，当IDE提供预设的模板，或者不同团队分享代码库时，这一效果就更加明显了。<br> 管理开发工作。首先，IDE提供文档工具，可以自动输入开发者评论，或者迫使开发者在不同区域编写评论。其次，IDE可以展示资源，更便于发现应用所处位置，无需在文件系统里面艰难的搜索。</p><p>❀缺点<br> 学习曲线问题。IDE基本上是比较复杂的工具，为了更好的熟练使用，需要一定的时间和耐心。<br> 初学者的困难。对初学者来说，使用IDE来学习开发有相当的难度，不适合学习一种新语言时使用。<br> 无法修复坏代码或设计。开发者不能完全依赖工具的便捷，还是必须保持专业水准和熟练度，开发的成果好坏主要还是看开发员的技术。</p></blockquote><h3 id="1-2-JetBrains公司介绍"><a class="header-anchor" href="#1-2-JetBrains公司介绍">☀</a>1.2 JetBrains公司介绍</h3><ol><li><p>IntelliJ IDEA就是Java的IDE。</p></li><li><p>市场占有率竹节攀升，超过了Eclipse。</p></li><li><p>官网：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.jetbrains.com/">https://www.jetbrains.com/</a></p></li><li><p>JetBrains公司介绍：<br> JetBrains是一家捷克的软件开发公司，该公司位于捷克的布拉格，并在俄罗斯的圣彼得堡及美国麻州波士顿都设有办公室，该公司最为人所熟知的产品是Java编程语言开发撰写时所用的集成开发环境：IntelliJ IDEA。公司旗下还有其它产品，比如：</p><ul><li>WebStorm: 用于开发JavaScript、HTML5、 CS3等前端技术;</li><li>PyCharm: 用于开发python（python语言热度排行榜排名第一，在人工智能大数据领域应用）</li><li>PhpStorm: 用于开发PHP</li><li>RubyMine: 用于开发Ruby/Rails</li><li>AppCode: 用于开发Objective - C/Swift,替换xcode的</li><li>CLion: 用于开发C/C++</li><li>DataGrip: 用于开发数据库和SQL</li><li>Rider: <a target="_blank" rel="noopener external nofollow noreferrer" href="http://xn--6kq11kn9kgkw.NET">用于开发.NET</a></li><li>GoLand: 用于开发Go（区块链主流开发语言就是Go语言）</li></ul></li></ol><h3 id="1-3-IntelliJ-IDEA介绍"><a class="header-anchor" href="#1-3-IntelliJ-IDEA介绍">☀</a>1.3 IntelliJ IDEA介绍</h3><p>【1】IDEA 全称IntelliJ IDEA，是用于java语言开发的集成环境IDE(Integrated Development Environment)，也可用于其他语言。<br> IntelliJ在业界被公认为最好的java开发工具之一，尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的。</p><p>IDEA是JetBrains公司的产品，这家公司总部位于捷克共和国的首都布拉格，开发人员以严谨著称的东欧程序员为主。</p><p>【2】IDEA的支持：<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/12/20201212162327.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/12/20201212162327.png" srcset="" alt="image-20201212162324421"></p><p>【3】IDEA的优势（相对于Eclipse）</p><ol><li>强大的整合能力。比如: Git、 Maven、 Spring 等</li><li>提示功能的快速、便捷</li><li>提示功能的范围广</li><li>好用的快捷键和代码模板</li><li>精准搜索</li></ol><hr><h2 id="2-安装相关"><a class="header-anchor" href="#2-安装相关">☀</a>2.安装相关</h2><h3 id="2-1-IntelliJ-IDEA的下载和安装的准备"><a class="header-anchor" href="#2-1-IntelliJ-IDEA的下载和安装的准备">☀</a>2.1 IntelliJ IDEA的下载和安装的准备</h3><p>【1】官网：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.jetbrains.com/idea/download/#section=windows">https://www.jetbrains.com/idea/download/#section=windows</a></p><p>【2】安装的准备：</p><ol><li>硬件环境：<br> 内存8G以上<br> CPU i5以上<br> 安装在固态硬盘下</li><li>软件环境：<br> 需要安装JDK</li></ol><h3 id="2-2-IDEA的卸载"><a class="header-anchor" href="#2-2-IDEA的卸载">☀</a>2.2 IDEA的卸载</h3><p>对于免安装的idea：<br> （1）删除安装文件<br> （2）到用户下将idea的缓存，配置的目录删除掉即可</p><p>对于安装的idea:</p><ol><li>可以用控制面板–》程序。</li><li>检查用户下将idea的缓存，配置的目录，如果有删除掉即可 。</li></ol><h3 id="2-3-IDEA的安装和破解"><a class="header-anchor" href="#2-3-IDEA的安装和破解">☀</a>2.3 IDEA的安装和破解</h3><h4 id="方式一：（破解已失效）"><a class="header-anchor" href="#方式一：（破解已失效）">☀</a><s>方式一：（破解已失效）</s></h4><p>【1】将安装包进行解压–》选择固态盘符<br> 【2】发送到桌面快捷方式，生成一个快捷方式<br> 【3】打开：</p><p>选择主题：<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/12/20201212173858.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/12/20201212173858.png" srcset="" alt="image-20201212173858485"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153323.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153323.png" srcset="" alt="image-20201213153322641"></p><p>先进入再说，免费试用：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153348.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153348.png" srcset="" alt="image-20201213153348474"></p><p>创建一个项目：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153408.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153408.png" srcset="" alt="image-20201213153408275"></p><p>选择JDK：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153452.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153452.png" srcset="" alt="image-20201213153451820"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153611.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153611.png" srcset="" alt="image-20201213153611489"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153629.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153629.png" srcset="" alt="image-20201213153629614"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153712.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153712.png" srcset="" alt="image-20201213153712447"></p><p>找到jetbrains-agent.jar 文件，然后放入合适的文件夹内（我一般直接放入idea的安装位置了，你随意，不建议有中文路径）</p><p>点击IDEA的菜单，找到： Help—》Edit Custom VM Options</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153746.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153746.png" srcset="" alt="image-20201213153746433"></p><p>然后在文件中最后一行填入：</p><p>-javaagent:D:\soft_setup\IDEA\ideaIU-2019.2.3.win\jetbrains-agent.jar<br> 注意这个jetbrains-agent.jar的路径要是你自己的真实的路径。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153935.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153935.png" srcset="" alt="image-20201213153935552"></p><p>关闭IDEA</p><p>再次打开IDEA，点击菜单 ，Help—》Register:<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153953.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213153953.png" srcset="" alt="image-20201213153953878"></p><p>填写address地址：<a target="_blank" rel="noopener external nofollow noreferrer" href="https://fls.jetbrains-agent.com">https://fls.jetbrains-agent.com</a>。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213154023.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213154023.png" srcset="" alt="image-20201213154023822"></p><p>关闭IDEA</p><p>重启IDEA</p><p>看到带Licenseed to…字样的 证明激活成功</p><h4 id="方式二："><a class="header-anchor" href="#方式二：">☀</a>方式二：</h4><p>官网下载最新IDEA。</p><p>获取Avtivation code注册码获取网站： <a target="_blank" rel="noopener external nofollow noreferrer" href="http://vrg123.com/">http://vrg123.com/</a></p><p>获取注册码后，使用Avtivation code注册码激活即可。</p><h2 id="3-IDEA页面展示"><a class="header-anchor" href="#3-IDEA页面展示">☀</a>3.IDEA页面展示</h2><ol><li>项目下内容：<ul><li>工程下的src类似于Eclipse下的src目录，用于存放代码。。</li><li>工程下的.idea 和TestProject.iml文件都是IDEA工程特有的。类似于Eclipse 工程下的settings、.classpath、.project 等。</li></ul></li><li>配置：<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213161959.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213161959.png" srcset="" alt="image-20201213161959492"><br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213162133.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213162133.png" srcset="" alt="image-20201213162133204"><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213162306.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213162306.png" srcset="" alt="image-20201213162306801"></li></ol><h2 id="4-Module的概念和使用"><a class="header-anchor" href="#4-Module的概念和使用">☀</a>4.Module的概念和使用</h2><p>【1】在Eclipse中我们有Workspace (工作空间)和Project (工程)的概念，在IDEA中只有Project (工程)和Module (模块)的概念。<br> 这里的对应关系为:<br> IDEA官网说明:<br> An Eclipse workspace is similar to a project in IntelliJ IDEA<br> An Eclipse project maps to a module in IntelliJ IDEA<br> 翻译:<br> Eclipse中 workspace 相当于 IDEA中的Project<br> Eclipse中 Project 相当于 IDEA中的Module<br> 在IntelliJ IDEA中Project(工程) 是最顶级的级别，次级别是Module(模块)。<br> 一个Project下可以有多个Module。</p><p>【2】从Eclipse 转过来的人总是下意识地要在同一个窗口管理n个项目，这在Intellij IDEA是无法做到的。Intellij IDEA提供的解决方案是打开多个项目实例，即打开多个项目窗口。即:一个Project 打开一个Window窗口。</p><p>【3】IDEA这样设置的原因：<br> 目前主流的大型项目都是分布式部署的，结构都是类似这种多Module的。<br> 这类项目一般是这样划分的，比如: 积分模块、任务模块、活动模块等等，模块之间彼此可以相互依赖。这些Module之间都是处于同一个项目业务下的模块，彼此之间是有不可分割的业务关系的。</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213211205.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213211205.png" srcset="" alt="image-20201213211202672"></p><p>【4】out目录的说明：里面存放的是编译后的字节码文件<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213211239.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213211239.png" srcset="" alt="image-20201213211239043"></p><p>【5】删除模块：<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213211257.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/13/20201213211257.png" srcset="" alt="image-20201213211257510"></p><h2 id="5-常用设置"><a class="header-anchor" href="#5-常用设置">☀</a>5.常用设置</h2><h3 id="5-1进入设置："><a class="header-anchor" href="#5-1进入设置：">☀</a>5.1进入设置：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215174539.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215174539.png" srcset="" alt="image-20201215174530626"></p><h3 id="5-2设置主题："><a class="header-anchor" href="#5-2设置主题：">☀</a>5.2设置主题：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215174626.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215174626.png" srcset="" alt="image-20201215174625985"></p><h3 id="5-3编辑区的字体变大或者变小："><a class="header-anchor" href="#5-3编辑区的字体变大或者变小：">☀</a>5.3编辑区的字体变大或者变小：</h3><p>通过ctrl+鼠标滚轮改变编辑区字体大小。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175333.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175333.png" srcset="" alt="image-20201215175333312"></p><h3 id="5-4鼠标悬浮在代码上有提示："><a class="header-anchor" href="#5-4鼠标悬浮在代码上有提示：">☀</a>5.4鼠标悬浮在代码上有提示：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175501.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175501.png" srcset="" alt="image-20201215175500950"></p><h3 id="5-5自动导包和优化多余的包："><a class="header-anchor" href="#5-5自动导包和优化多余的包：">☀</a>5.5自动导包和优化多余的包：</h3><p>手动导包：快捷键：alt+enter<br> 两个选项对应自动导包和优化多余的包：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175532.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175532.png" srcset="" alt="image-20201215175532062"></p><h3 id="5-6同一个包下的类，超过指定个数的时候，导包合并为"><a class="header-anchor" href="#5-6同一个包下的类，超过指定个数的时候，导包合并为">☀</a>5.6同一个包下的类，超过指定个数的时候，导包合并为*</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175603.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175603.png" srcset="" alt="image-20201215175603155"></p><h3 id="5-7显示行号-，-方法和方法间的分隔符："><a class="header-anchor" href="#5-7显示行号-，-方法和方法间的分隔符：">☀</a>5.7显示行号 ， 方法和方法间的分隔符：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175646.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175646.png" srcset="" alt="image-20201215175646291"></p><h3 id="5-8忽略大小写，进行提示："><a class="header-anchor" href="#5-8忽略大小写，进行提示：">☀</a>5.8忽略大小写，进行提示：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175744.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175744.png" srcset="" alt="image-20201215175744680"></p><h3 id="5-9多个类不隐藏，多行显示："><a class="header-anchor" href="#5-9多个类不隐藏，多行显示：">☀</a>5.9多个类不隐藏，多行显示：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175934.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215175934.png" srcset="" alt="image-20201215175934197"></p><h3 id="5-10设置默认的字体，字体大小，字体行间距：-编辑区和控制台都会变化"><a class="header-anchor" href="#5-10设置默认的字体，字体大小，字体行间距：-编辑区和控制台都会变化">☀</a>5.10设置默认的字体，字体大小，字体行间距：(编辑区和控制台都会变化)</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184835.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184835.png" srcset="" alt="image-20201215182119070"></p><h3 id="5-11修改代码中注释的字体颜色："><a class="header-anchor" href="#5-11修改代码中注释的字体颜色：">☀</a>5.11修改代码中注释的字体颜色：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184827.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184827.png" srcset="" alt="image-20201215182041457"></p><h3 id="5-12修改类头的文档注释信息：—》注意：对新建的类才有效"><a class="header-anchor" href="#5-12修改类头的文档注释信息：—》注意：对新建的类才有效">☀</a>5.12修改类头的文档注释信息：—》注意：对新建的类才有效</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">/**</span><br><span class="line">* @Auther: zhaoss</span><br><span class="line">* @Date: $&#123;DATE&#125; - $&#123;MONTH&#125; - $&#123;DAY&#125; - $&#123;TIME&#125;</span><br><span class="line">* @Description: $&#123;PACKAGE_NAME&#125;</span><br><span class="line">* @version: 1.0</span><br><span class="line">*/</span><br></pre></td></tr></table></figure><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215181710.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215181710.png" srcset="" alt="image-20201215181710055"></p><h3 id="5-13设置项目文件编码："><a class="header-anchor" href="#5-13设置项目文件编码：">☀</a>5.13设置项目文件编码：</h3><p>文件右下角可以调节编码格式：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190033.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190033.png" srcset="" alt="image-20201215190032898"></p><h3 id="5-14自动编译："><a class="header-anchor" href="#5-14自动编译：">☀</a>5.14自动编译：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190710.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190710.png" srcset="" alt="image-20201215190709963"></p><p>二、Registry<br> ctrl+alt+shift+’/’<br> 弹出框选择如下，勾选即可。</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130201740.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130201740.png" srcset="" alt="image-20201130201740546"></p><h3 id="5-15省电模式："><a class="header-anchor" href="#5-15省电模式：">☀</a>5.15省电模式：</h3><p>代码检查、代码提示没有肯能进入省电模式。<img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190740.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190740.png" srcset="" alt="image-20201215190740199"></p><h3 id="5-16代码显示结构："><a class="header-anchor" href="#5-16代码显示结构：">☀</a>5.16代码显示结构：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215191310.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215191310.png" srcset="" alt="image-20201215191131637"></p><h3 id="5-17导入jar包："><a class="header-anchor" href="#5-17导入jar包：">☀</a>5.17导入jar包：</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190925.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190925.png" srcset="" alt=""></p><h3 id="5-18生成序列化版本号："><a class="header-anchor" href="#5-18生成序列化版本号：">☀</a>5.18生成序列化版本号：</h3><p>凡是一个类实现了<strong>Serializable接口</strong>，建议给该类提供一个<strong>固定不变</strong>的序列化版本号。以后这个类即使代码修改了，但是版本号不变，java虚拟机认为是同一个类。（区分类的）</p><p>IDEA设置自动生成序列化版本号<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/23/20210223201032.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/23/20210223201032.png" srcset="" alt="在这里插入图片描述"></p><p>检查代码时会出现添加seriaID提示。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215191625.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215191625.png" srcset="" alt="image-20201215191623211"></p><h3 id="5-19设置控制台输出日志解码格式"><a class="header-anchor" href="#5-19设置控制台输出日志解码格式">☀</a>5.19设置控制台输出日志解码格式</h3><p>导航Help——&gt;Edit Custom VM Options<br> 添加文本设置：<code>-Dfile.encoding=UTF-8</code></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226131748.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226131748.png" srcset="" alt="image-20210226131748541"></p><h3 id="5-20-开启Lambda表达式显示"><a class="header-anchor" href="#5-20-开启Lambda表达式显示">☀</a>5.20.开启Lambda表达式显示.</h3><p>settings-&gt;Editor-&gt;Gutter icons-&gt;Lambda 勾选即可.</p><h2 id="6-常用快捷键"><a class="header-anchor" href="#6-常用快捷键">☀</a>6.常用快捷键</h2><table><thead><tr><th>快捷键</th><th>功能</th><th></th></tr></thead><tbody><tr><td>double shift</td><td>全局搜索(集合下方的一些搜索功能)</td><td></td></tr><tr><td>Ctrl+N</td><td>按照文件名称查找java文件</td><td></td></tr><tr><td>Ctrl+Shift+N</td><td>按照文件名称查找所有文件</td><td></td></tr><tr><td>Ctrl+Shift+F</td><td>在所有文件中查找指定内容。</td><td></td></tr><tr><td>Ctrl+F</td><td>在当前文件中查找指定内容。</td><td></td></tr><tr><td>Ctrl+E</td><td>列出最近使用过的文件</td><td></td></tr><tr><td>Ctrl+Shift+Alt+N</td><td>查找类中的方法或变量</td><td></td></tr><tr><td>Ctrl + Alt + v</td><td>自动补全变量名称</td><td></td></tr><tr><td>Ctrl + Alt + f</td><td>自动补全属性名称</td><td></td></tr><tr><td>Shift + Esc</td><td>关闭打开的小窗口</td><td></td></tr><tr><td>Tab/Enter</td><td>将提示内容自动补全</td><td></td></tr><tr><td>Alt+Enter</td><td>代码检查提示，放在类名，对象，变量。</td><td></td></tr><tr><td>alt+insert</td><td>创建内容(项目中，包中，类中，文本中)</td><td></td></tr><tr><td>psvm</td><td>main方法</td><td></td></tr><tr><td>sout</td><td>输出语句的简写，sout/str.sout</td><td></td></tr><tr><td>ctrl+d</td><td>复制行(单行/多行)</td><td></td></tr><tr><td>ctrl+y</td><td>删除行</td><td></td></tr><tr><td>Ctrl + Shift + Up / Down</td><td>代码向上/下移动</td><td></td></tr><tr><td>Ctrl + / 或 Ctrl + Shift + /</td><td>单行注释或多行注释</td><td></td></tr><tr><td>shift+f6</td><td>重命名</td><td></td></tr><tr><td>Ctrl+O</td><td>重写父类方法</td><td></td></tr><tr><td>fori</td><td>for循环</td><td></td></tr><tr><td>ctrl+alt+t</td><td>代码块包围：try-catch,if,while等</td><td></td></tr><tr><td>Ctrl+空格</td><td>手动显示代码自动补全提示</td><td>keymap-&gt;code-&gt;completion-&gt;basic可修改。</td></tr><tr><td>ctrl+鼠标滚轮</td><td>idea代码字体大小放大和缩小的快捷键</td><td>keymap-&gt;搜索font-size</td></tr><tr><td>alt+方向上/下</td><td>类中方法之间跳跃</td><td></td></tr><tr><td>alt+方向左/右</td><td>已打开的类中左右切换</td><td></td></tr><tr><td>ctrl+方向上/下</td><td>光标不动，下拉页面(鼠标滚轮功能)</td><td></td></tr><tr><td>ctrl+方向左/右</td><td>光标不在窗口中，将窗口移动到光标范围中。光标在窗口中，则进行字符串之间跳跃。</td><td></td></tr><tr><td>ctrl+鼠标悬浮在代码上+点进去即可</td><td>代码一层一层调用的快捷键：<br>点进源码</td><td></td></tr><tr><td>ctrl+alt+方向左/右</td><td>切换查看代码的导航，前进/后退</td><td>keymap-&gt;搜索navigate</td></tr><tr><td>alt+7</td><td>显示代码结构</td><td></td></tr><tr><td>alt+1</td><td>显示project工程结构导航</td><td></td></tr><tr><td>ctrl+z</td><td>撤回</td><td></td></tr><tr><td>ctrl+shift+z</td><td>redo(重做)</td><td></td></tr><tr><td>tab</td><td>缩进/提示内容自动补全</td><td></td></tr><tr><td>shift+tab</td><td>取消缩进</td><td></td></tr><tr><td>shift+enter</td><td>新建下一行并跳转到下一行。</td><td></td></tr><tr><td>ctrl+shift+F9</td><td>编译当前文件</td><td></td></tr><tr><td>ctrl+F9</td><td>编译工程</td><td></td></tr><tr><td>ctrl+shift+F10</td><td>运行当前文件main方法</td><td></td></tr><tr><td>shift+F10</td><td>运行文件(优先选择之前运行过的/web项目目标为Tomcat，在工具中选择。)</td><td><img src="https://i.loli.net/2021/02/27/SqfUQ1D3lraR6y9.png" class="lazyload" data-srcset="https://i.loli.net/2021/02/27/SqfUQ1D3lraR6y9.png" srcset="" alt="image-20210227171725322"></td></tr><tr><td>shift+F9</td><td>debug文件(优先选择之前debug过的)/web项目目标为Tomcat</td><td></td></tr><tr><td>alt+shift+F10</td><td>不跳转窗口，选择已打开的文件运行。</td><td></td></tr><tr><td>alt+shift+F9</td><td>不跳转窗口，选择已打开的文件编译。</td><td></td></tr><tr><td>alt+F8</td><td>查看表达式的值。</td><td></td></tr><tr><td>ctrl+B</td><td>查看方法哪里被调用</td><td></td></tr><tr><td><code>Ctrl+Shift+回车</code></td><td>语句自动补全添加<code>;</code></td><td></td></tr><tr><td><code>Ctrl+Alt+L</code></td><td>代码格式化。</td><td></td></tr><tr><td><code>Ctrl+Shift+J</code></td><td>代码去空格。搜压缩。</td><td></td></tr></tbody></table><h2 id="7-常用操作："><a class="header-anchor" href="#7-常用操作：">☀</a>7.常用操作：</h2><h3 id="7-1多文件并联展示"><a class="header-anchor" href="#7-1多文件并联展示">☀</a>7.1多文件并联展示</h3><p>文件名，右键Split Vertically 垂直展示</p><p>文件名，右键Split Horizontally 水平展示</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184804.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184804.png" srcset="" alt="/"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184807.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215184807.png" srcset="" alt="image-20201215184739498"></p><h3 id="7-2导入jar包"><a class="header-anchor" href="#7-2导入jar包">☀</a>7.2导入jar包</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190925.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/15/20201215190925.png" srcset="" alt=""></p><h3 id="7-3代码模板使用"><a class="header-anchor" href="#7-3代码模板使用">☀</a>7.3代码模板使用</h3><h4 id="7-3-1代码模板是什么"><a class="header-anchor" href="#7-3-1代码模板是什么">☀</a>7.3.1代码模板是什么</h4><p>它的原理就是配置一些==常用代码字母缩写==，在输入简写时可以出现你预定义的固定模式的代码，使得开发效率大大提高，同时也可以增加个性化。最简单的例子就是在Java中输入sout会出现System.out.println();</p><p>（一）所处位置：<br> （1）Live Templates<br> （2）Postfix Completion<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216085228.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216085228.png" srcset="" alt="image-20201216085226441"></p><p>（二）区别：<br> 【1】<br> Live Templates中可以做用户的个性化定制。<br> Postfix Completion中只能用，不能修改。<br> 【2】使用方式不同<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216085347.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216085347.png" srcset="" alt="image-20201216085347392"></p><h4 id="7-3-2常用的代码模板"><a class="header-anchor" href="#7-3-2常用的代码模板">☀</a>7.3.2常用的代码模板</h4><p>【1】模板1： main方法：</p><blockquote><p>main 或者 psvm</p></blockquote><p>【2】模板2：输出语句：</p><blockquote><p>sout 或者 .sout<br> 一些变型：<br> soutp:打印方法的形参<br> soutm:打印方法的名字<br> soutv:打印变量</p></blockquote><p>【3】模板3： 循环</p><blockquote><p>普通for循环： fori（正向） 或者 .fori （正向） . forr(逆向)<br> 增强for循环： iter 或者 .for<br> （可以用于数组的遍历，集合的遍历）</p></blockquote><p>【4】模板4： 条件判断</p><blockquote><p>ifn 或者 .null ：判断是否为null （if null）<br> inn 或者 .nn ：判断不等于null (if not null)</p></blockquote><p>【5】模板5： 属性修饰符：</p><blockquote><p>prsf : private static final<br> psf :public static final</p></blockquote><p><strong>后缀多用于指定，非后缀多用于就近。</strong></p><p>【6】 模板6：生成变量</p><blockquote><p>.var:在调用有返回的方法上，使用，自动生成变量。</p></blockquote><h4 id="7-3-3修改现有模板"><a class="header-anchor" href="#7-3-3修改现有模板">☀</a>7.3.3修改现有模板</h4><p>【1】案例1：改main方法： psvm</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216093706.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216093706.png" srcset="" alt="image-20201216093706516"></p><p>【2】案例2：修饰属性的修饰符：</p><p><code>$VAR1$</code> <code>$VAR2$</code> 表示占位符，光标会落到占位符上。</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216093734.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216093734.png" srcset="" alt="image-20201216093734765"></p><h4 id="7-3-4自定义模板"><a class="header-anchor" href="#7-3-4自定义模板">☀</a>7.3.4自定义模板</h4><p>【1】测试方法：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216101613.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216101613.png" srcset="" alt="image-20201216101612925"></p><p>【2】常用属性：($$中的内容其实就是在定义光标的位置，光标可以切换，用回车切换)</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216101714.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216101714.png" srcset="" alt="image-20201216101714195"></p><p>【3】方法注释模板：</p><figure class="highlight txt"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">/**</span><br><span class="line">* 功能描述:</span><br><span class="line">* @param: $param$</span><br><span class="line">* @return: $return$</span><br><span class="line">* @auther: $user$</span><br><span class="line">* @date: $date$ $time$</span><br><span class="line">*/</span><br></pre></td></tr></table></figure><p>/** 回车补全和默认方法注释冲突，设定使用tab补全提示。</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216101915.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216101915.png" srcset="" alt="image-20201216101915753"></p><h3 id="7-4-IDEA中的断点调试"><a class="header-anchor" href="#7-4-IDEA中的断点调试">☀</a>7.4 IDEA中的断点调试</h3><h4 id="7-4-1常用断点调试快捷键"><a class="header-anchor" href="#7-4-1常用断点调试快捷键">☀</a>7.4.1常用断点调试快捷键</h4><p>调试在开发中大量应用：<br> 【1】Debug的优化设置：更加节省内存空间：<br> 设置Debug连接方式，默认是Socket。 Shared memory是Windows 特有的一个属性，一般在Windows系统下建议使用此设置，<br> 内存占用相对较少。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216103527.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216103527.png" srcset="" alt="image-20201216103527648"></p><p>【2】常用断点调试快捷键：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110146.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110146.png" srcset="" alt="image-20201216110146597">一步一步的向下运行代码，不会走入任何方法中。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110211.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110211.png" srcset="" alt="image-20201216110211281">一步一步的向下运行代码，不会走入系统类库的方法中，但是会走入自定义的方法中。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110223.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110223.png" srcset="" alt="image-20201216110223480">一步一步的向下运行代码，会走入系统类库的方法中，也会走入自定义的方法中。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110250.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216110250.png" srcset="" alt="image-20201216110250196">跳出方法<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216112524.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216112524.png" srcset="" alt="image-20201216112524113">结束程序<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216112539.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216112539.png" srcset="" alt="image-20201216112538926">进入到下一个断点，如果没有下一个断点了，就直接运行到程序结束。<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216112554.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216112554.png" srcset="" alt="image-20201216112554584"> 在当前次取消行的断点。</p><h4 id="7-4-2条件判断，查看表达式的值"><a class="header-anchor" href="#7-4-2条件判断，查看表达式的值">☀</a>7.4.2条件判断，查看表达式的值</h4><p>【1】条件判断：<br> 说明:<br> 调试的时候，在循环里增加条件判断，可以极大的提高效率，心情也能惧悦。<br> 具体操作:<br> 在断点处右击调出条件断点。可以在满足某个条件下，实施断点。<img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216170813.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216170813.png" srcset="" alt="image-20201216170811331"></p><p>【2】查看表达式的值：<br> 选择行，alt+f8。<img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216170926.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216170926.png" srcset="" alt="image-20201216170926268"></p><h3 id="7-5创建Java-Web项目"><a class="header-anchor" href="#7-5创建Java-Web项目">☀</a>7.5创建Java Web项目</h3><p>创建Java Web的模块：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195121.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195121.png" srcset="" alt="image-20201216195121375"></p><h3 id="7-6在IDEA中添加Tomcat的镜像"><a class="header-anchor" href="#7-6在IDEA中添加Tomcat的镜像">☀</a>7.6在IDEA中添加Tomcat的镜像</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195447.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195447.png" srcset="" alt="image-20201216195447657"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195549.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195549.png" srcset="" alt="image-20201216195549394"></p><p>启动项目：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195607.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195607.png" srcset="" alt="image-20201216195607221"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195657.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/16/20201216195657.png" srcset="" alt="image-20201216195656977"></p><h3 id="7-7-ToolBar中显示和隐藏一些插件选项"><a class="header-anchor" href="#7-7-ToolBar中显示和隐藏一些插件选项">☀</a>7.7 ToolBar中显示和隐藏一些插件选项</h3><p>隐藏：右键-&gt;remove from sidebar</p><p>显示：view-&gt;tool window</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214191319.gif" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214191319.gif" srcset="" alt=""></p><h3 id="7-8-为新工程添加框架文件支持"><a class="header-anchor" href="#7-8-为新工程添加框架文件支持">☀</a>7.8.为新工程添加框架文件支持.</h3><p>使用Maven自带web模板创建web工程：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226144659.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226144659.png" srcset="" alt="image-20210226144659327"></p><p>使用创建Maven自带的模板创建web工程，没有java，resource资源文件夹。</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226145820.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226145820.png" srcset="" alt="image-20210226145820154"></p><p>⛵️ <strong>解决办法：先创建一个标准的Maven工程，使用idea的Framework support功能</strong></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226150415.gif" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226150415.gif" srcset="" alt="1"></p><p>创建出来的工程比较标准：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226145310.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/26/20210226145310.png" srcset="" alt="image-20210226145309911"></p><h2 id="8-插件"><a class="header-anchor" href="#8-插件">☀</a>8.插件</h2><p><a target="_blank" rel="noopener external nofollow noreferrer" href="https://plugins.jetbrains.com/search">插件官网</a><br> <strong>注意：在网站中所搜的插件需要和idea版本对应上。在idea内部搜索安装不用担心版本问题。</strong></p><h3 id="8-1-Gist"><a class="header-anchor" href="#8-1-Gist">☀</a>8.1 Gist</h3><table><thead><tr><th>插件名</th><th>评价说明</th></tr></thead><tbody><tr><td>Gist Templates</td><td>idea2019无法使用</td></tr><tr><td>Get gist (Beta)</td><td>idea2019无法使用</td></tr><tr><td>Use Gists</td><td>目前只有2018可使用与MAGist类似没有搜索功能</td></tr><tr><td>Gist Snippet</td><td>没有搜索功能，新版支持。</td></tr><tr><td>MAGist</td><td>没有搜索功能，新版支持。</td></tr><tr><td></td><td></td></tr></tbody></table><h3 id="8-2-JRebel"><a class="header-anchor" href="#8-2-JRebel">☀</a>8.2 JRebel</h3><p>dea热部署插件」 Rebel<br> 当开始开发web项目的时候,需要频繁的修改web页面,此时如果频繁的重启变得很麻烦,因此,可以在idea<br> 中集成Rebe插件,改动代码之后不需要重新启动应用程序。</p><p>服务器地址监听服务器地址：</p><p><a target="_blank" rel="noopener external nofollow noreferrer" href="http://jrebel.cicoding.cn">http://jrebel.cicoding.cn</a></p><p>GUID生成器：</p><p><a target="_blank" rel="noopener external nofollow noreferrer" href="http://jrebel.cicoding.cn/guid">http://jrebel.cicoding.cn/guid</a></p><p>监听配置格式：</p><p><a target="_blank" rel="noopener external nofollow noreferrer" href="http://jrebel.cicoding.cn/GUID">http://jrebel.cicoding.cn/GUID</a></p><p>生成的如下：</p><p><a target="_blank" rel="noopener external nofollow noreferrer" href="http://jrebel.cicoding.cn/4B068EB5-0941-4645-1E98-FC077D530A61">http://jrebel.cicoding.cn/4B068EB5-0941-4645-1E98-FC077D530A61</a></p><p>打开IDEA中Settings如下：<img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/03/02/20210302101648.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/03/02/20210302101648.png" srcset="" alt="image-20200203205627409"></p><p>找到File -&gt; Settings -&gt; JRebel &amp; XRebel 点击Chanage license，填写URL和邮箱地址<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/03/02/20210302101711.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/03/02/20210302101711.png" srcset="" alt="image-20200203205802704"></p><p>点击Chanage license！<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/03/02/20210302101735.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/03/02/20210302101735.png" srcset="" alt="image-20200203210758095"></p><p>就监听成功激活成功了！鼓掌！</p><p>然后就可以启动使用了！</p><h2 id="9-遇到问题解决"><a class="header-anchor" href="#9-遇到问题解决">☀</a>9.遇到问题解决</h2><h3 id="1-performing-vcs-refresh时间过长"><a class="header-anchor" href="#1-performing-vcs-refresh时间过长">☀</a>1.performing vcs refresh时间过长</h3><p>解决方案：重建项目</p><p>I also found that rebuilding the project <strong>(Build --&gt; Rebuild project)</strong> did the trick. At the end of that task it says… saving cashes. Immediately thereafter I can commit with no delay.</p><h3 id="2-Error-java-无效的源发行版-11-Error-java-Compilation-failed-internal-java-compiler-error"><a class="header-anchor" href="#2-Error-java-无效的源发行版-11-Error-java-Compilation-failed-internal-java-compiler-error">☀</a>2.Error:java: 无效的源发行版: 11/Error:java: Compilation failed: internal java compiler error</h3><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/03/20210203081939" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/03/20210203081939" srcset="" alt="这里写图片描述"></p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130171540.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130171540.png" srcset="" alt="image-20201130171539251"></p><blockquote><p>因在于模块的target bytecode version和实际的编译器版本不一致所导致的错误。</p><p>不管三七二十一，把所有jdk版本统统改成一样的，首先按下快捷键ctrl+shift+alt+s:</p></blockquote><blockquote><p>查看项目的jdk</p><p>File -&gt;Project Structure-&gt;Project Settings -&gt;Project或使用快捷键Ctrl+Alt+shift+S打开项目的jdk配置：</p></blockquote><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/03/20210203081948.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/03/20210203081948.png" srcset="" alt="image-20201112131611287"></p><blockquote><p>查看工程的jdk</p><p>点击上图中Modules查看对应jdk版本：</p></blockquote><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130171754.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130171754.png" srcset="" alt="image-20201130171753983"></p><blockquote><p>查看java编译器版本</p></blockquote><p><img src="https://i.loli.net/2021/02/27/ZQpg34XvCLNI1MK.png" class="lazyload" data-srcset="https://i.loli.net/2021/02/27/ZQpg34XvCLNI1MK.png" srcset="" alt="image-20210227124301643"></p><blockquote><p>导入java项目时此处处问题的概率比较多。</p><p>针对此问题，重新打开或修改pom文件（maven项目）中的内容很可能导致jdk版本重新变为1.5。如果是maven项目，可在pom文件中指定jdk相关信息：</p><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">build</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">plugins</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">plugin</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.apache.maven.plugins<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>maven-compiler-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">configuration</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">source</span>&gt;</span>1.7<span class="tag">&lt;/<span class="name">source</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">target</span>&gt;</span>1.7<span class="tag">&lt;/<span class="name">target</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">plugins</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">build</span>&gt;</span></span><br></pre></td></tr></table></figure></blockquote><h3 id="3-class类按名称搜索不到"><a class="header-anchor" href="#3-class类按名称搜索不到">☀</a>3.class类按名称搜索不到</h3><p>将编译主目录取消Exclusion。<strong>Exclusion的思想类似于git中的.gitignore被标记的文件不会被跟踪搜索到。</strong></p><p>Exclusion方式一：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130212033.jpeg" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130212033.jpeg" srcset="" alt="http://img3.sycdn.imooc.com/5a3104020001cc6212841046.jpg"></p><p>Exclusion方式二：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130212423.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/11/3020201130212423.png" srcset="" alt="image-20201130212423378"></p><h3 id="4-Github登录不上"><a class="header-anchor" href="#4-Github登录不上">☀</a>4.Github登录不上</h3><h4 id="4-1使用用户名："><a class="header-anchor" href="#4-1使用用户名：">☀</a>4.1使用用户名：</h4><p><strong><code>❀测试结果：</code></strong><br> idea2018 和2019版本均无法登录。</p><p><strong><code>❀测试报错：</code></strong></p><ol><li>Invalid authentication data. Operation canceled<br> Incorrect credentials</li></ol><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214150457.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214150457.png" srcset="" alt="image-20201214150457180"><br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214150523.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214150523.png" srcset="" alt="image-20201214150523381"></p><ol start="3"><li>Incorrect credentials. Request response:401 Unautghorized<img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214181112.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214181112.png" srcset="" alt="image-20201214181106335"></li></ol><h4 id="4-2使用token："><a class="header-anchor" href="#4-2使用token：">☀</a>4.2使用token：</h4><p><strong><code>❀测试结果：</code></strong></p><p>2019版本可以登录</p><p>2018登录报错。</p><p><strong><code>❀测试报错：</code></strong></p><ol><li><p>Can’t get input stream from URL!<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214151153.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214151153.png" srcset="" alt="image-20201214151153083"></p></li><li><p>Connect to <a target="_blank" rel="noopener external nofollow noreferrer" href="http://api.github.com:443">api.github.com:443</a> [<a target="_blank" rel="noopener external nofollow noreferrer" href="http://api.github.com/192.30.255.117">api.github.com/192.30.255.117</a>] faild:Read time out<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214155659.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214155659.png" srcset="" alt="image-20201214155659561"></p></li><li><p>Request response:401 Unauthorized - Bad credentials<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214155811.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214155811.png" srcset="" alt="image-20201214155810936"></p></li></ol><p>尝试解决：</p><ol><li>用邮箱账号登录</li><li>在地址前面,手动添加 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://github.com">https://github.com</a></li><li>在【Windwos 凭据】删除保存的账号密码 ，重启Android Studio，再次登录就可<img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214164622.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2020/12/14/20201214164622.png" srcset="" alt="img"></li><li>如果忘记密码 ，在Github【Settings】-&gt;【Deveployer settings】-&gt;【Personal access token】获取new token ，使用new token登录。</li><li>file-&gt;setting-&gt;system settings去掉代理，HTTP Proxy -&gt;No proxy</li><li>将github上的token全部删除，再次通过github登录github。</li></ol><h3 id="5-使用本地Tomcat，运行时缺少，添加第三方jar。"><a class="header-anchor" href="#5-使用本地Tomcat，运行时缺少，添加第三方jar。">☀</a>5.使用本地Tomcat，运行时缺少，添加第三方jar。</h3><p>在工程的配置文件中添加，Artifacts。</p><p><img src="https://i.loli.net/2021/02/27/NCjYkDWi8zH2M4E.png" class="lazyload" data-srcset="https://i.loli.net/2021/02/27/NCjYkDWi8zH2M4E.png" srcset="" alt="image-20210227124759108"></p><h3 id="6-本地Tomcat解决控制台输出乱码"><a class="header-anchor" href="#6-本地Tomcat解决控制台输出乱码">☀</a>6.本地Tomcat解决控制台输出乱码</h3><p>1、外置Tomcat解决办法：</p><p>1）Tomcat控制台启动乱码：Tomcat-&gt;Edit Configurations</p><p><img src="https://i.loli.net/2021/02/27/5VKDLgroF3ZpeYn.png" class="lazyload" data-srcset="https://i.loli.net/2021/02/27/5VKDLgroF3ZpeYn.png" srcset="" alt="img"></p><p>2）Tomcat-&gt;-Dfile.encoding=UTF-8</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173130.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173130.png" srcset="" alt="image-20210227173110434"></p><p>3）重启Tomcat查看控制台</p><p>2、若未解决使用以下方法进行idea设置：</p><p>1）Help-&gt;Edit Custom VM options<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173038.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173038.png" srcset="" alt="img"></p><p>2）增加：-Dfile.encoding=UTF-8<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173130.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173130.png" srcset="" alt="img"></p><p>3、若还是有乱码继续设置：</p><p>1）Settins-&gt;Editor-&gt;File Encodings<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173211.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173211.png" srcset="" alt="img"></p><p>2）Build,Execution,Deployment-&gt;java compiler<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173219.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173219.png" srcset="" alt="img"></p><p>4、get请求查询mysql数据控制台显示乱码：</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173228.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173228.png" srcset="" alt="img"></p><p>解决办法：设置字符格式为utf-8 -&gt; VM options: -Dfile.encoding=UTF-8<br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173239.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227173239.png" srcset="" alt="img"></p><h3 id="7-本地Tomcat，静态资源未实时部署。"><a class="header-anchor" href="#7-本地Tomcat，静态资源未实时部署。">☀</a>7.本地Tomcat，静态资源未实时部署。</h3><p>使用rebuild。</p><p><img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227190319.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227190319.png" srcset="" alt="image-20210227190319553"></p><p>使用update项目：<code>Ctrl+F10</code>或者<code>Shift+F10</code><br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227210307.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227210307.png" srcset="" alt="image-20210227210307875"><br> <img src="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227210525.png" class="lazyload" data-srcset="https://yefeit-note-picbed.oss-cn-shanghai.aliyuncs.com/blog/2021/02/07/20210227210525.png" srcset="" alt="image-20210227210525213"></p><h2 id="参考文献"><a class="header-anchor" href="#参考文献">☀</a>参考文献</h2><iframe src="//player.bilibili.com/player.html?aid=457519225&bvid=BV1N5411L73Z&cid=250034286&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" height="500" width="100%"></iframe><p><a target="_blank" rel="noopener external nofollow noreferrer" href="https://www.zhihu.com/question/275332337">idea有没有eclipse下的workspace的功能？</a></p><div class="footer"><div class="copyright"><blockquote><p>博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议</p><p>本文永久链接是：<a href="http://aner1001.gitee.io/posts/2021/02/03/1a4c243e0505/">http://aner1001.gitee.io/posts/2021/02/03/1a4c243e0505/</a></p></blockquote></div></div><div class="article-meta" id="bottom"><div class="new-meta-box"><div class="new-meta-item date" itemprop="dateUpdated" datetime="2021-02-03T08:22:36+08:00"><a class="notlink"><i class="fas fa-edit fa-fw" aria-hidden="true"></i><p>更新于：2021年2月3日</p></a></div><div class="new-meta-item meta-tags"><a class="tag" href="/tags/IDEA/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>IDEA</p></a></div><div class="new-meta-item share -mob-share-list"><div class="-mob-share-list share-body"> <a class="-mob-share-qq" title="" rel="external nofollow noopener noreferrer noopener" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://aner1001.gitee.io/posts/2021/02/03/1a4c243e0505/&title=IDEA手册 - Tang's blog.&summary=IDEA 全称IntelliJ IDEA，是用于java语言开发的集成环境IDE(Integrated Development Environment)，也可用于其他语言。IntelliJ在业界被公认为最好的java开发工具之一，尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的。"><img src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/qq.png" class="lazyload" data-srcset="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/qq.png" srcset=""></a> <a class="-mob-share-qzone" title="" rel="external nofollow noopener noreferrer noopener" target="_blank" href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://aner1001.gitee.io/posts/2021/02/03/1a4c243e0505/&title=IDEA手册 - Tang's blog.&summary=IDEA 全称IntelliJ IDEA，是用于java语言开发的集成环境IDE(Integrated Development Environment)，也可用于其他语言。IntelliJ在业界被公认为最好的java开发工具之一，尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的。"><img src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/qzone.png" class="lazyload" data-srcset="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/qzone.png" srcset=""></a> <a class="-mob-share-weibo" title="" rel="external nofollow noopener noreferrer noopener" target="_blank" href="http://service.weibo.com/share/share.php?url=http://aner1001.gitee.io/posts/2021/02/03/1a4c243e0505/&title=IDEA手册 - Tang's blog.&summary=IDEA 全称IntelliJ IDEA，是用于java语言开发的集成环境IDE(Integrated Development Environment)，也可用于其他语言。IntelliJ在业界被公认为最好的java开发工具之一，尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、 创新的GUI设计等方面的功能可以说是超常的。"><img src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/weibo.png" class="lazyload" data-srcset="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/weibo.png" srcset=""></a><div class="hoverbox"> <a class="share"><img src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/wechat.png" class="lazyload" data-srcset="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/wechat.png" srcset=""></a><div class="target"> <img src=""></div></div> <a class="-mob-share-telegram" title="" rel="external nofollow noopener noreferrer noopener" target="_blank" href="https://t.me/share/url?url=http://aner1001.gitee.io/posts/2021/02/03/1a4c243e0505/&text=IDEA手册 - Tang's blog."><img src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/telegram.png" class="lazyload" data-srcset="https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/logo/128/telegram.png" srcset=""></a></div></div></div></div><div class="prev-next"><a class="prev" href="/posts/2021/02/03/602d40b55cff/"><p class="title"><i class="fas fa-chevron-left" aria-hidden="true"></i>什么是域名、主机、服务商、CDN</p><p class="content">什么是域名？什么是主机？什么是服务商？什么是CDN？ ☀1.什么是域名 域名(Domain) ☀1.1定义 域名，通俗来讲，是互联网上用来标记网站的名字。 当我们说一个网站的网址时，其实说的是...</p></a><a class="next" href="/posts/2021/02/03/acf16ba36ec8/"><p class="title">GitHub使用手册<i class="fas fa-chevron-right" aria-hidden="true"></i></p><p class="content">本文简要介绍GitHub的相关功能和基本操作。 ☀1.概念总览 Repository 仓库 仓库用来存放项目代码，每个项目对应一个仓库，多个开源项目则有多个仓库。 Star 收藏 仓...</p></a></div></article><article class="post white-box reveal shadow" id="comments"><p ct><i class="fas fa-comments"></i> 评论</p><div id="valine_container" class="valine_thread"><i class="fas fa-cog fa-spin fa-fw fa-2x"></i></div></article></div><aside class="l_side"><section class="widget toc-wrapper shadow desktop mobile" id="toc-div"><header><i class="fas fa-list fa-fw" aria-hidden="true"></i> <span class="name">本文目录</span></header><div class="content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-%E6%A6%82%E5%BF%B5"><span class="toc-text">1.概念</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-1-IDE"><span class="toc-text">1.1 IDE</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-2-JetBrains%E5%85%AC%E5%8F%B8%E4%BB%8B%E7%BB%8D"><span class="toc-text">1.2 JetBrains公司介绍</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-3-IntelliJ-IDEA%E4%BB%8B%E7%BB%8D"><span class="toc-text">1.3 IntelliJ IDEA介绍</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E5%AE%89%E8%A3%85%E7%9B%B8%E5%85%B3"><span class="toc-text">2.安装相关</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#2-1-IntelliJ-IDEA%E7%9A%84%E4%B8%8B%E8%BD%BD%E5%92%8C%E5%AE%89%E8%A3%85%E7%9A%84%E5%87%86%E5%A4%87"><span class="toc-text">2.1 IntelliJ IDEA的下载和安装的准备</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-2-IDEA%E7%9A%84%E5%8D%B8%E8%BD%BD"><span class="toc-text">2.2 IDEA的卸载</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-3-IDEA%E7%9A%84%E5%AE%89%E8%A3%85%E5%92%8C%E7%A0%B4%E8%A7%A3"><span class="toc-text">2.3 IDEA的安装和破解</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E5%BC%8F%E4%B8%80%EF%BC%9A%EF%BC%88%E7%A0%B4%E8%A7%A3%E5%B7%B2%E5%A4%B1%E6%95%88%EF%BC%89"><span class="toc-text">方式一：（破解已失效）</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E5%BC%8F%E4%BA%8C%EF%BC%9A"><span class="toc-text">方式二：</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-IDEA%E9%A1%B5%E9%9D%A2%E5%B1%95%E7%A4%BA"><span class="toc-text">3.IDEA页面展示</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-Module%E7%9A%84%E6%A6%82%E5%BF%B5%E5%92%8C%E4%BD%BF%E7%94%A8"><span class="toc-text">4.Module的概念和使用</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-%E5%B8%B8%E7%94%A8%E8%AE%BE%E7%BD%AE"><span class="toc-text">5.常用设置</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#5-1%E8%BF%9B%E5%85%A5%E8%AE%BE%E7%BD%AE%EF%BC%9A"><span class="toc-text">5.1进入设置：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-2%E8%AE%BE%E7%BD%AE%E4%B8%BB%E9%A2%98%EF%BC%9A"><span class="toc-text">5.2设置主题：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-3%E7%BC%96%E8%BE%91%E5%8C%BA%E7%9A%84%E5%AD%97%E4%BD%93%E5%8F%98%E5%A4%A7%E6%88%96%E8%80%85%E5%8F%98%E5%B0%8F%EF%BC%9A"><span class="toc-text">5.3编辑区的字体变大或者变小：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-4%E9%BC%A0%E6%A0%87%E6%82%AC%E6%B5%AE%E5%9C%A8%E4%BB%A3%E7%A0%81%E4%B8%8A%E6%9C%89%E6%8F%90%E7%A4%BA%EF%BC%9A"><span class="toc-text">5.4鼠标悬浮在代码上有提示：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-5%E8%87%AA%E5%8A%A8%E5%AF%BC%E5%8C%85%E5%92%8C%E4%BC%98%E5%8C%96%E5%A4%9A%E4%BD%99%E7%9A%84%E5%8C%85%EF%BC%9A"><span class="toc-text">5.5自动导包和优化多余的包：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-6%E5%90%8C%E4%B8%80%E4%B8%AA%E5%8C%85%E4%B8%8B%E7%9A%84%E7%B1%BB%EF%BC%8C%E8%B6%85%E8%BF%87%E6%8C%87%E5%AE%9A%E4%B8%AA%E6%95%B0%E7%9A%84%E6%97%B6%E5%80%99%EF%BC%8C%E5%AF%BC%E5%8C%85%E5%90%88%E5%B9%B6%E4%B8%BA"><span class="toc-text">5.6同一个包下的类，超过指定个数的时候，导包合并为*</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-7%E6%98%BE%E7%A4%BA%E8%A1%8C%E5%8F%B7-%EF%BC%8C-%E6%96%B9%E6%B3%95%E5%92%8C%E6%96%B9%E6%B3%95%E9%97%B4%E7%9A%84%E5%88%86%E9%9A%94%E7%AC%A6%EF%BC%9A"><span class="toc-text">5.7显示行号 ， 方法和方法间的分隔符：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-8%E5%BF%BD%E7%95%A5%E5%A4%A7%E5%B0%8F%E5%86%99%EF%BC%8C%E8%BF%9B%E8%A1%8C%E6%8F%90%E7%A4%BA%EF%BC%9A"><span class="toc-text">5.8忽略大小写，进行提示：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-9%E5%A4%9A%E4%B8%AA%E7%B1%BB%E4%B8%8D%E9%9A%90%E8%97%8F%EF%BC%8C%E5%A4%9A%E8%A1%8C%E6%98%BE%E7%A4%BA%EF%BC%9A"><span class="toc-text">5.9多个类不隐藏，多行显示：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-10%E8%AE%BE%E7%BD%AE%E9%BB%98%E8%AE%A4%E7%9A%84%E5%AD%97%E4%BD%93%EF%BC%8C%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F%EF%BC%8C%E5%AD%97%E4%BD%93%E8%A1%8C%E9%97%B4%E8%B7%9D%EF%BC%9A-%E7%BC%96%E8%BE%91%E5%8C%BA%E5%92%8C%E6%8E%A7%E5%88%B6%E5%8F%B0%E9%83%BD%E4%BC%9A%E5%8F%98%E5%8C%96"><span class="toc-text">5.10设置默认的字体，字体大小，字体行间距：(编辑区和控制台都会变化)</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-11%E4%BF%AE%E6%94%B9%E4%BB%A3%E7%A0%81%E4%B8%AD%E6%B3%A8%E9%87%8A%E7%9A%84%E5%AD%97%E4%BD%93%E9%A2%9C%E8%89%B2%EF%BC%9A"><span class="toc-text">5.11修改代码中注释的字体颜色：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-12%E4%BF%AE%E6%94%B9%E7%B1%BB%E5%A4%B4%E7%9A%84%E6%96%87%E6%A1%A3%E6%B3%A8%E9%87%8A%E4%BF%A1%E6%81%AF%EF%BC%9A%E2%80%94%E3%80%8B%E6%B3%A8%E6%84%8F%EF%BC%9A%E5%AF%B9%E6%96%B0%E5%BB%BA%E7%9A%84%E7%B1%BB%E6%89%8D%E6%9C%89%E6%95%88"><span class="toc-text">5.12修改类头的文档注释信息：—》注意：对新建的类才有效</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-13%E8%AE%BE%E7%BD%AE%E9%A1%B9%E7%9B%AE%E6%96%87%E4%BB%B6%E7%BC%96%E7%A0%81%EF%BC%9A"><span class="toc-text">5.13设置项目文件编码：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-14%E8%87%AA%E5%8A%A8%E7%BC%96%E8%AF%91%EF%BC%9A"><span class="toc-text">5.14自动编译：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-15%E7%9C%81%E7%94%B5%E6%A8%A1%E5%BC%8F%EF%BC%9A"><span class="toc-text">5.15省电模式：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-16%E4%BB%A3%E7%A0%81%E6%98%BE%E7%A4%BA%E7%BB%93%E6%9E%84%EF%BC%9A"><span class="toc-text">5.16代码显示结构：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-17%E5%AF%BC%E5%85%A5jar%E5%8C%85%EF%BC%9A"><span class="toc-text">5.17导入jar包：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-18%E7%94%9F%E6%88%90%E5%BA%8F%E5%88%97%E5%8C%96%E7%89%88%E6%9C%AC%E5%8F%B7%EF%BC%9A"><span class="toc-text">5.18生成序列化版本号：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-19%E8%AE%BE%E7%BD%AE%E6%8E%A7%E5%88%B6%E5%8F%B0%E8%BE%93%E5%87%BA%E6%97%A5%E5%BF%97%E8%A7%A3%E7%A0%81%E6%A0%BC%E5%BC%8F"><span class="toc-text">5.19设置控制台输出日志解码格式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-20-%E5%BC%80%E5%90%AFLambda%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%98%BE%E7%A4%BA"><span class="toc-text">5.20.开启Lambda表达式显示.</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-%E5%B8%B8%E7%94%A8%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="toc-text">6.常用快捷键</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#7-%E5%B8%B8%E7%94%A8%E6%93%8D%E4%BD%9C%EF%BC%9A"><span class="toc-text">7.常用操作：</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#7-1%E5%A4%9A%E6%96%87%E4%BB%B6%E5%B9%B6%E8%81%94%E5%B1%95%E7%A4%BA"><span class="toc-text">7.1多文件并联展示</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-2%E5%AF%BC%E5%85%A5jar%E5%8C%85"><span class="toc-text">7.2导入jar包</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-3%E4%BB%A3%E7%A0%81%E6%A8%A1%E6%9D%BF%E4%BD%BF%E7%94%A8"><span class="toc-text">7.3代码模板使用</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-1%E4%BB%A3%E7%A0%81%E6%A8%A1%E6%9D%BF%E6%98%AF%E4%BB%80%E4%B9%88"><span class="toc-text">7.3.1代码模板是什么</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-2%E5%B8%B8%E7%94%A8%E7%9A%84%E4%BB%A3%E7%A0%81%E6%A8%A1%E6%9D%BF"><span class="toc-text">7.3.2常用的代码模板</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-3%E4%BF%AE%E6%94%B9%E7%8E%B0%E6%9C%89%E6%A8%A1%E6%9D%BF"><span class="toc-text">7.3.3修改现有模板</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-4%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A8%A1%E6%9D%BF"><span class="toc-text">7.3.4自定义模板</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-4-IDEA%E4%B8%AD%E7%9A%84%E6%96%AD%E7%82%B9%E8%B0%83%E8%AF%95"><span class="toc-text">7.4 IDEA中的断点调试</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#7-4-1%E5%B8%B8%E7%94%A8%E6%96%AD%E7%82%B9%E8%B0%83%E8%AF%95%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="toc-text">7.4.1常用断点调试快捷键</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-4-2%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD%EF%BC%8C%E6%9F%A5%E7%9C%8B%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%9A%84%E5%80%BC"><span class="toc-text">7.4.2条件判断，查看表达式的值</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-5%E5%88%9B%E5%BB%BAJava-Web%E9%A1%B9%E7%9B%AE"><span class="toc-text">7.5创建Java Web项目</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-6%E5%9C%A8IDEA%E4%B8%AD%E6%B7%BB%E5%8A%A0Tomcat%E7%9A%84%E9%95%9C%E5%83%8F"><span class="toc-text">7.6在IDEA中添加Tomcat的镜像</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-7-ToolBar%E4%B8%AD%E6%98%BE%E7%A4%BA%E5%92%8C%E9%9A%90%E8%97%8F%E4%B8%80%E4%BA%9B%E6%8F%92%E4%BB%B6%E9%80%89%E9%A1%B9"><span class="toc-text">7.7 ToolBar中显示和隐藏一些插件选项</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-8-%E4%B8%BA%E6%96%B0%E5%B7%A5%E7%A8%8B%E6%B7%BB%E5%8A%A0%E6%A1%86%E6%9E%B6%E6%96%87%E4%BB%B6%E6%94%AF%E6%8C%81"><span class="toc-text">7.8.为新工程添加框架文件支持.</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#8-%E6%8F%92%E4%BB%B6"><span class="toc-text">8.插件</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#8-1-Gist"><span class="toc-text">8.1 Gist</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-2-JRebel"><span class="toc-text">8.2 JRebel</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#9-%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%E8%A7%A3%E5%86%B3"><span class="toc-text">9.遇到问题解决</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-performing-vcs-refresh%E6%97%B6%E9%97%B4%E8%BF%87%E9%95%BF"><span class="toc-text">1.performing vcs refresh时间过长</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-Error-java-%E6%97%A0%E6%95%88%E7%9A%84%E6%BA%90%E5%8F%91%E8%A1%8C%E7%89%88-11-Error-java-Compilation-failed-internal-java-compiler-error"><span class="toc-text">2.Error:java: 无效的源发行版: 11&#x2F;Error:java: Compilation failed: internal java compiler error</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-class%E7%B1%BB%E6%8C%89%E5%90%8D%E7%A7%B0%E6%90%9C%E7%B4%A2%E4%B8%8D%E5%88%B0"><span class="toc-text">3.class类按名称搜索不到</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-Github%E7%99%BB%E5%BD%95%E4%B8%8D%E4%B8%8A"><span class="toc-text">4.Github登录不上</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#4-1%E4%BD%BF%E7%94%A8%E7%94%A8%E6%88%B7%E5%90%8D%EF%BC%9A"><span class="toc-text">4.1使用用户名：</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-2%E4%BD%BF%E7%94%A8token%EF%BC%9A"><span class="toc-text">4.2使用token：</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-%E4%BD%BF%E7%94%A8%E6%9C%AC%E5%9C%B0Tomcat%EF%BC%8C%E8%BF%90%E8%A1%8C%E6%97%B6%E7%BC%BA%E5%B0%91%EF%BC%8C%E6%B7%BB%E5%8A%A0%E7%AC%AC%E4%B8%89%E6%96%B9jar%E3%80%82"><span class="toc-text">5.使用本地Tomcat，运行时缺少，添加第三方jar。</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-%E6%9C%AC%E5%9C%B0Tomcat%E8%A7%A3%E5%86%B3%E6%8E%A7%E5%88%B6%E5%8F%B0%E8%BE%93%E5%87%BA%E4%B9%B1%E7%A0%81"><span class="toc-text">6.本地Tomcat解决控制台输出乱码</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-%E6%9C%AC%E5%9C%B0Tomcat%EF%BC%8C%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90%E6%9C%AA%E5%AE%9E%E6%97%B6%E9%83%A8%E7%BD%B2%E3%80%82"><span class="toc-text">7.本地Tomcat，静态资源未实时部署。</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE"><span class="toc-text">参考文献</span></a></li></ol></div></section></aside><script>window.pdata={},pdata.ispage=!0,pdata.postTitle="IDEA手册",pdata.commentPath="",pdata.commentPlaceholder="";var l_header=document.getElementById("l_header");l_header.classList.add("show");var cover_wrapper=document.querySelector(".cover-wrapper");cover_wrapper.id="none",cover_wrapper.style.display="none"</script></div><footer class="footer clearfix"><br><br><div class="aplayer-container"><meting-js theme="#1BCDFC" autoplay="false" volume="0.7" loop="all" order="list" fixed="false" list-max-height="320px" server="netease" type="playlist" id="5472211102" list-folded="true"></meting-js></div><br><div class="social-wrapper"><a href="/atom.xml" class="social fas fa-rss flat-btn" target="_blank" rel="external nofollow noopener noreferrer"></a><a href="mailto:584856024@qq.com" class="social fas fa-envelope flat-btn" target="_blank" rel="external nofollow noopener noreferrer"></a><a href="https://github.com/aner1001" class="social fab fa-github flat-btn" target="_blank" rel="external nofollow noopener noreferrer"></a><a href="https://music.163.com/#/user/home?id=1402271985" class="social fas fa-headphones-alt flat-btn" target="_blank" rel="external nofollow noopener noreferrer"></a></div><div><p>博客内容遵循 <a target="_blank" rel="noopener external nofollow noreferrer" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议</a></p></div><div><p><span id="lc-sv">本站总访问量为<span id="number"><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span> 次</span> <span id="lc-uv">访客数为<span id="number"><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span> 人</span></p></div> 本站使用 <a href="https://github.com/volantis-x/hexo-theme-volantis/tree/4.3.1" rel="external nofollow noreferrer" target="_blank" class="codename">Volantis</a> 作为主题，总访问量为<span id="busuanzi_value_site_pv"><i class="fas fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i></span> 次<div class="copyright"><p><a href="/">Copyright © 2021-2021 XXX</a></p></div></footer><a id="s-top" class="fas fa-arrow-up fa-fw" href="javascript:void(0)" rel="external nofollow noreferrer"></a></div></div><div><script>function VPjax(){function e(e,t){this.name=t||e.name,this.run=()=>{e()}}this.list=[],this.start=()=>{for(var e=0;e<this.list.length;e++)this.list[e].run()},this.push=(t,n)=>{var i=new e(t,n);this.list.push(i)}}function loadScript(e,t){setTimeout((function(){var n=document.getElementsByTagName("head")[0]||document.documentElement,i=document.createElement("script");i.setAttribute("type","text/javascript"),t&&(i.onload=t),i.setAttribute("src",e),n.appendChild(i)}))}window.volantis={},window.volantis.loadcss=document.getElementById("loadcss"),volantis.pjax={},volantis.pjax.method={complete:new VPjax,error:new VPjax,send:new VPjax},volantis.pjax={...volantis.pjax,push:volantis.pjax.method.complete.push,error:volantis.pjax.method.error.push,send:volantis.pjax.method.send.push};var loadCSS=function(e,t,n,i){var o,a=window.document,s=a.createElement("link");if(t)o=t;else{var r=(a.body||a.getElementsByTagName("head")[0]).childNodes;o=r[r.length-1]}var d=a.styleSheets;if(i)for(var l in i)i.hasOwnProperty(l)&&s.setAttribute(l,i[l]);s.rel="stylesheet",s.href=e,s.media="only x",function e(t){if(a.body)return t();setTimeout((function(){e(t)}))}((function(){o.parentNode.insertBefore(s,t?o:o.nextSibling)}));var u=function(e){for(var t=s.href,n=d.length;n--;)if(d[n].href===t)return e();setTimeout((function(){u(e)}))};function h(){s.addEventListener&&s.removeEventListener("load",h),s.media=n||"all"}return s.addEventListener&&s.addEventListener("load",h),s.onloadcssdefined=u,u(h),s}</script><script>loadCSS("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.14/css/all.min.css",window.volantis.loadcss),loadCSS("https://cdn.jsdelivr.net/gh/l-lin/font-awesome-animation/dist/font-awesome-animation.min.css",window.volantis.loadcss),loadCSS("https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css",window.volantis.loadcss)</script><script src="https://cdn.jsdelivr.net/npm/jquery@3.5/dist/jquery.min.js"></script><script>function pjax_fancybox(){$(".md .gallery").find("img").each((function(){var a=document.createElement("a");$(a).attr("class","fancybox"),$(a).attr("pjax-fancybox",""),$(a).attr("href",$(this).attr("src")),$(this).attr("data-original")&&$(a).attr("href",$(this).attr("data-original")),$(a).attr("data-fancybox","images");var t="";$(this).attr("alt")&&($(a).attr("data-caption",$(this).attr("alt")),t=$(this).attr("alt"));var n=document.createElement("div");$(n).addClass("fancybox"),$(this).wrap(n);var o=document.createElement("span");$(o).addClass("image-caption"),$(o).text(t),$(this).after(o),$(this).wrap(a)})),$(".md .gallery").find("img").fancybox({selector:'[data-fancybox="images"]',hash:!1,loop:!1,closeClick:!0,helpers:{overlay:{closeClick:!0}},buttons:["zoom","close"]})}function SCload_fancybox(){0!=$(".md .gallery").find("img").length&&(loadCSS("https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css",document.getElementById("loadcss")),loadScript("https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js",pjax_fancybox))}function Pjax_SCload_fancybox(){void 0===$.fancybox?SCload_fancybox():pjax_fancybox()}$((function(){SCload_fancybox()})),volantis.pjax.push(Pjax_SCload_fancybox),volantis.pjax.send(()=>{void 0!==$.fancybox&&$.fancybox.close()},"fancybox")</script><script src="https://cdn.jsdelivr.net/npm/jquery-backstretch@2.1.18/jquery.backstretch.min.js"></script><script type="text/javascript">var imgs=["https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/001.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/002.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/003.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/004.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/005.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/006.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/012.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/016.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/019.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/025.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/033.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/034.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/035.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/038.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/039.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/042.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/046.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/051.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/052.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/054.jpg","https://cdn.jsdelivr.net/gh/volantis-x/cdn-wallpaper-minimalist/2020/056.jpg"];{function shuffle(t){for(var n=t.length;n--;){var i=Math.floor(Math.random()*n),l=t[i];t[i]=t[n],t[n]=l}}shuffle(imgs)}function Pjax_backstretch(){$("#cover-backstretch").backstretch(imgs,{duration:"10000",fade:"1500"})}loadScript("https://cdn.jsdelivr.net/npm/jquery-backstretch@2.1.18/jquery.backstretch.min.js",Pjax_backstretch)</script><div id="rightmenu-wrapper"><ul class="list-v rightmenu" id="rightmenu-content"><li class="option"><a class="vlts-menu opt fix-cursor-default" id="menu-copy-text" onclick='document.execCommand("copy")'><i class="fa fa-copy fa-fw"></i> 复制文本</a><hr id="hr-text"><a class="vlts-menu opt fix-cursor-default" id="menu-copy-href"><i class="fa fa-link fa-fw"></i> 复制链接</a><a class="vlts-menu opt fix-cursor-default" id="menu-open-href"><i class="fa fa-external-link-square-alt fa-fw"></i> 在新标签页打开</a><hr id="hr-href"><a class="vlts-menu opt fix-cursor-default" id="menu-copy-src"><i class="fa fa-image fa-fw"></i> 复制图片地址</a><hr id="hr-src"></li><li class="navigation"><a class="nav icon-only fix-cursor-default" onclick="history.back()"><i class="fa fa-arrow-left fa-fw"></i></a><a class="nav icon-only fix-cursor-default" onclick="history.forward()"><i class="fa fa-arrow-right fa-fw"></i></a><a class="nav icon-only fix-cursor-default" onclick="window.location.reload()"><i class="fa fa-redo fa-fw"></i></a><a class="nav icon-only fix-cursor-default" href="/"><i class="fa fa-home fa-fw"></i></a></li><hr><li><a class="vlts-menu fix-cursor-default" href="https://volantis.js.org/faqs/" id="https:volantisjsorgfaqs"><i class="fa fa-question fa-fw"></i> 常见问题</a></li><li><a class="vlts-menu fix-cursor-default" href="https://volantis.js.org/examples/" id="https:volantisjsorgexamples"><i class="fa fa-rss fa-fw"></i> 示例博客</a></li><li><a class="vlts-menu fix-cursor-default" href="https://volantis.js.org/contributors/" id="https:volantisjsorgcontributors"><i class="fa fa-fan fa-spin fa-fw"></i> 加入社区</a></li><hr><li><a class="vlts-menu fix-cursor-default" href="https://github.com/volantis-x/volantis-docs/" id="https:githubcomvolantis-xvolantis-docs"><i class="fa fa-code-branch fa-fw"></i> 本站源码</a></li><li><a class="vlts-menu fix-cursor-default" href="https://github.com/volantis-x/hexo-theme-volantis/" id="https:githubcomvolantis-xhexo-theme-volantis"><i class="fa fa-code-branch fa-fw"></i> 主题源码</a></li><hr><li><a class="vlts-menu fix-cursor-default" onclick='document.execCommand("print")'><i class="fa fa-print fa-fw"></i> 打印页面</a></li><hr><li><a class="vlts-menu fix-cursor-default toggle-mode-btn"><i class="fas fa-moon fa-fw"></i> Dark</a></li><hr><li class="music name"><p class="nav music-title fix-cursor-default"></p></li><li class="music ctrl"><a class="nav icon-only backward fix-cursor-default" onclick="aplayerBackward()"><i class="fa fa-step-backward fa-fw"></i></a><a class="nav icon-only toggle fix-cursor-default" onclick="aplayerToggle()"><i class="fa fa-play fa-fw"></i></a><a class="nav icon-only forward fix-cursor-default" onclick="aplayerForward()"><i class="fa fa-step-forward fa-fw"></i></a></li><li class="music volume"><a class="nav volume"><div class="aplayer-volume-bar-wrap"><div class="aplayer-volume-bar fix-cursor-pointer"><div class="aplayer-volume"></div><i class="left fa fa-volume-off fa-fw"></i><i class="right fa fa-volume-up fa-fw"></i></div></div></a></li></ul></div><script>function popMenu(e){var t=document.getElementById("rightmenu-wrapper"),n=document.getElementById("rightmenu-content"),l=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight;t.style.left=e.clientX+"px",t.style.top=e.clientY+"px",t.style.display="block",2*e.clientX>l?n.classList.add("left"):n.classList.remove("left"),2*e.clientY>o?n.classList.add("top"):n.classList.remove("top");let c=document.getElementById("hr-text"),d=document.getElementById("hr-src"),y=document.getElementById("hr-href"),s=document.getElementById("menu-copy-src");null!=s&&(e.target.currentSrc?(s.style.display="block",s.addEventListener("click",(function(t){copyString(e.target.currentSrc)}),{once:!0}),d.style.display="block"):(s.style.display="none",d.style.display="none"));let r="";if(e.path)for(i=0;i<e.path.length;i++)null!=e.path[i].href&&e.path[i].href.length>0&&(r=e.path[i].href);let u=document.getElementById("menu-copy-text");u.style.display="none",c.style.display="none",0==r.length&&window.getSelection().toString()&&(u.style.display="block",c.style.display="block");let m=document.getElementById("menu-open-href");null!=m&&(r.length>0?(m.style.display="block",m.addEventListener("click",(function(e){window.open(r)}),{once:!0}),y.style.display="block"):(m.style.display="none",y.style.display="none"));let a=document.getElementById("menu-copy-href");return null!=a&&(r.length>0?(a.style.display="block",a.addEventListener("click",(function(e){copyString(r)}),{once:!0})):a.style.display="none"),volantis.APlayerLoaded&&checkAPlayer(),!1}function hideMenu(){document.getElementById("rightmenu-wrapper").style.display="none"}function copyString(e){const t=document.createElement("input");t.setAttribute("readonly","readonly"),document.body.appendChild(t),t.setAttribute("value",e),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.document.oncontextmenu=function(e){return!!e.ctrlKey||(!!/Android|webOS|BlackBerry/i.test(navigator.userAgent)||popMenu(e))},document.addEventListener("click",(function(e){document.getElementById("rightmenu-wrapper").style.display="none"})),document.execCommand("click")</script><script>function loadIssuesJS(){0!=$(".md").find(".issues-api").length&&loadScript("https://cdn.jsdelivr.net/npm/hexo-theme-volantis@4.3.1/source/js/issues.min.js")}$((function(){loadIssuesJS()})),volantis.pjax.push(()=>{"undefined"==typeof IssuesAPI&&loadIssuesJS()},"IssuesJS")</script><script defer="defer" src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"></script><script>window.lazyLoadOptions={elements_selector:".lazyload",threshold:0},window.addEventListener("LazyLoad::Initialized",(function(n){window.lazyLoadInstance=n.detail.instance}),!1),document.addEventListener("DOMContentLoaded",(function(){lazyLoadInstance.update()})),document.addEventListener("pjax:complete",(function(){lazyLoadInstance.update()}))</script><script>window.FPConfig={delay:0,ignoreKeywords:[],maxRPS:5,hoverDelay:25}</script><script defer="defer" src="https://cdn.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js"></script><script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script><script>var clipboard=new ClipboardJS(".btn-copy",{target:function(e){return e.nextElementSibling}});function wait(e,i){window.setTimeout(e,i)}function pjax_initCopyCode(){if($(".highlight .code pre").length+$(".article pre code").length!=0){var e="";e+='<button class="btn-copy" data-clipboard-snippet="">',e+='<i class="fas fa-copy"></i><span>COPY</span>',e+="</button>",$(".highlight .code pre").before(e),$(".article pre code").before(e),clipboard.off("success").on("success",(function(e){let i=$(e.trigger);i.addClass("copied");let a=$(i.find("i"));a.removeClass("fa-copy"),a.addClass("fa-check-circle");let n=$(i.find("span"));n[0].innerText="COPIED",wait((function(){a.removeClass("fa-check-circle"),a.addClass("fa-copy"),n[0].innerText="COPY"}),2e3)})),clipboard.off("error").on("error",(function(e){e.clearSelection();let i=$(e.trigger);i.addClass("copy-failed");let a=$(i.find("i"));a.removeClass("fa-copy"),a.addClass("fa-times-circle");let n=$(i.find("span"));n[0].innerText="COPY FAILED",wait((function(){a.removeClass("fa-times-circle"),a.addClass("fa-copy"),n[0].innerText="COPY"}),2e3)}))}}$((function(){pjax_initCopyCode()})),volantis.pjax.push(pjax_initCopyCode)</script><script type="text/javascript">function pjax_scrollrebeal(){ScrollReveal().reveal(".l_main .reveal",{distance:"32px",duration:"800",interval:"20",scale:"1",easing:"ease-out"})}loadScript("https://cdn.jsdelivr.net/npm/scrollreveal@4.0.6/dist/scrollreveal.min.js"),$((function(){var e=setInterval((function(){"block"==$("#safearea").css("display")&&"undefined"!=typeof ScrollReveal&&(clearInterval(e),pjax_scrollrebeal())}),100)})),volantis.pjax.push(pjax_scrollrebeal)</script><script>let APlayerController=new Object;APlayerController.id="5472211102",APlayerController.volume="0.7",loadCSS("https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css",window.volantis.loadcss),loadScript("https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js"),window.volantis.APlayerLoaded=0;var checkAPlayer=setInterval((function(){window.APlayer&&"block"==$("#safearea").css("display")&&(clearInterval(checkAPlayer),window.volantis.APlayerLoaded||window.MetingJSElement||(window.volantis.APlayerLoaded=1,loadScript("https://cdn.jsdelivr.net/npm/meting@2.0/dist/Meting.min.js")))}),2500);loadScript("https://cdn.jsdelivr.net/npm/hexo-theme-volantis@4.3.1/source/js/aplayer.min.js")</script><script src="https://cdn.jsdelivr.net/npm/hexo-theme-volantis@4.3.1/source/js/valine.min.js"></script><script>function emoji(i,e,a){return i+"/"+i+"-"+e+"."+a}for(var emojiMaps={},i=1;i<=54;i++)emojiMaps["tieba-"+i]=emoji("tieba",i,"png");for(i=1;i<=101;i++)emojiMaps["qq-"+i]=emoji("qq",i,"gif");for(i=1;i<=116;i++)emojiMaps["aru-"+i]=emoji("aru",i,"gif");for(i=1;i<=125;i++)emojiMaps["twemoji-"+i]=emoji("twemoji",i,"png");for(i=1;i<=4;i++)emojiMaps["weibo-"+i]=emoji("weibo",i,"png");function pjax_valine(){if(!document.querySelectorAll("#valine_container")[0])return;let i=pdata.commentPlaceholder||"快来评论吧~",e=pdata.commentPath;if(0==e.length){e=""||decodeURI(window.location.pathname)}(new Valine).init(Object.assign({path:null,placeholder:"快来评论吧~",appId:"eL9fCmXLl3nAe225XYo1cRxj-MdYXbMMI",appKey:"5uTd5Uu8WJJIej6Efrivsvaa",meta:["nick","mail","link"],requiredFields:["nick","mail"],enableQQ:!0,recordIP:!1,avatar:"robohash",pageSize:10,lang:"zh-cn",highlight:!0,mathJax:!1},{el:"#valine_container",path:e,placeholder:i,emojiCDN:"https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/valine/",emojiMaps:emojiMaps}))}$((function(){pjax_valine()})),volantis.pjax.push(pjax_valine)</script><script defer="defer" src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-busuanzi@2.3/js/busuanzi.pure.mini.js" data-pjax></script><script src="https://cdn.jsdelivr.net/npm/hexo-theme-volantis@4.3.1/source/js/app.min.js"></script><script>const SearchServiceimagePath="https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@master/img/",ROOT="/".endsWith("/")?"/":"//";function listenSearch(){customSearch=new HexoSearch({imagePath:SearchServiceimagePath})}function setSearchService(){listenSearch()}$(".input.u-search-input").one("focus",(function(){loadScript("https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@2.6.4/js/search.js",setSearchService)}))</script><script src="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.js"></script><script type="text/javascript">$((function(){Waves.attach(".flat-btn",["waves-button"]),Waves.attach(".float-btn",["waves-button","waves-float"]),Waves.attach(".float-btn-light",["waves-button","waves-float","waves-light"]),Waves.attach(".flat-box",["waves-block"]),Waves.attach(".float-box",["waves-block","waves-float"]),Waves.attach(".waves-image"),Waves.init()}))</script><script src="https://cdn.jsdelivr.net/gh/volantis-x/cdn-volantis@2/js/comment_typing.js"></script><script defer="defer">const LCCounter={app_id:"C2dIVXJ48qC7eHgvQRId6niR-MdYXbMMI",app_key:"1956OGJ4LQhDxheBAO5WhPJn",custom_api_server:"",getRecord:(e,t,r)=>new Promise((function(n,i){e("get","/classes/Counter?where="+encodeURIComponent(JSON.stringify({url:t}))).then(e=>e.json()).then(({results:o,code:s,error:a})=>{if(401===s)throw a;if(o&&o.length>0){var l=o[0];n(l)}else e("post","/classes/Counter",{url:t,title:r,times:0}).then(e=>e.json()).then((e,t)=>{if(t)throw t;n(e)}).catch(e=>{console.error("Failed to create",e),i(e)})}).catch(e=>{console.error("LeanCloud Counter Error:",e),i(e)})})),increment:(e,t)=>new Promise((function(r,n){e("post","/batch",{requests:t}).then(e=>{if((e=e.json()).error)throw e.error;r(e)}).catch(e=>{console.error("Failed to save visitor count",e),n(e)})})),buildIncrement:e=>({method:"PUT",path:"/1.1/classes/Counter/"+e,body:{times:{__op:"Increment",amount:1}}}),validUV(){var e="LeanCloudUVTimestamp",t=localStorage.getItem(e);return!(t&&(new Date).getTime()-parseInt(t)<=864e5)&&(localStorage.setItem(e,(new Date).getTime().toString()),!0)},addCount(e){var t=[],r=[],n=document.querySelector("#lc-sv"),o=this.getRecord(e,"http://aner1001.gitee.io/#lc-sv","Visits").then(e=>{r.push(this.buildIncrement(e.objectId));var t=document.querySelectorAll("#lc-sv #number");t.length>0&&t.forEach((t,r,i)=>{t.innerText=e.times+1,n&&(n.style.display="inline")})});t.push(o);var s=document.querySelector("#lc-uv"),a=this.getRecord(e,"http://aner1001.gitee.io/#lc-uv","Visitors").then(e=>{var t=this.validUV();t&&r.push(this.buildIncrement(e.objectId));var n=document.querySelectorAll("#lc-uv #number");n.length>0&&n.forEach((r,n,i)=>{r.innerText=e.times+(t?1:0),s&&(s.style.display="inline")})});t.push(a);var l=document.querySelectorAll("#lc-pv");for(l.length,i=0;i<l.length;i++){let n=l[i],o=n.getAttribute("data-title");var h="http://aner1001.gitee.io"+n.getAttribute("data-path");if(h){var c=this.getRecord(e,h,o).then(e=>{let t=window.location.pathname;if(t.includes("index.html")&&(t=t.substring(0,t.lastIndexOf("index.html"))),n.getAttribute("data-path")==t&&r.push(this.buildIncrement(e.objectId)),n){var i=n.querySelector("#lc-pv #number");i&&(n.getAttribute("data-path")==t?i.innerText=(e.times||0)+1:i.innerText=e.times||0,n.style.display="inline")}});t.push(c)}}Promise.all(t).then(()=>{r.length>0&&this.increment(e,r)})},fetchData(e){this.addCount((t,r,n)=>fetch(`${e}/1.1${r}`,{method:t,headers:{"X-LC-Id":this.app_id,"X-LC-Key":this.app_key,"Content-Type":"application/json"},body:JSON.stringify(n)}))},refreshCounter(){var e="-MdYXbMMI"!==this.app_id.slice(-9)?this.custom_api_server:`https://${this.app_id.slice(0,8).toLowerCase()}.api.lncldglobal.com`;e?this.fetchData(e):fetch("https://app-router.leancloud.cn/2/route?appId="+this.app_id).then(e=>e.json()).then(({api_server:e})=>{this.fetchData("https://"+e)})}};LCCounter.refreshCounter(),document.addEventListener("pjax:complete",(function(){LCCounter.refreshCounter()}))</script><script>const rootElement=document.documentElement,darkModeStorageKey="user-color-scheme",rootElementDarkModeAttributeName="data-user-color-scheme",setLS=(e,t)=>{localStorage.setItem(e,t)},removeLS=e=>{localStorage.removeItem(e)},getLS=e=>localStorage.getItem(e),getModeFromCSSMediaQuery=()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",resetRootDarkModeAttributeAndLS=()=>{var e;rootElement.removeAttribute("data-user-color-scheme"),e=darkModeStorageKey,localStorage.removeItem(e)},validColorModeKeys={dark:!0,light:!0},applyCustomDarkModeSettings=e=>{const t=e||getLS(darkModeStorageKey);t===getModeFromCSSMediaQuery()?resetRootDarkModeAttributeAndLS():validColorModeKeys[t]?rootElement.setAttribute("data-user-color-scheme",t):resetRootDarkModeAttributeAndLS()},invertDarkModeObj={dark:"light",light:"dark"},toggleCustomDarkMode=()=>{let e=getLS(darkModeStorageKey);if(validColorModeKeys[e])e=invertDarkModeObj[e];else{if(null!==e)return;e=invertDarkModeObj[getModeFromCSSMediaQuery()]}var t,o;return t=darkModeStorageKey,o=e,localStorage.setItem(t,o),e};var btn=$("#wrapper .toggle-mode-btn,#rightmenu-wrapper .toggle-mode-btn");function bindToggleButton(){btn.on("click",e=>{const t=toggleCustomDarkMode();applyCustomDarkModeSettings(t)})}applyCustomDarkModeSettings(),document.addEventListener("DOMContentLoaded",bindToggleButton),volantis.pjax.push(bindToggleButton),volantis.pjax.send(()=>{btn.unbind("click")},"toggle-mode-btn-unbind")</script><script>function listennSidebarTOC(){const e=document.querySelectorAll(".toc li");if(!e.length)return;const t=[...e].map(e=>{const t=e.querySelector(".toc-link"),n=document.getElementById(decodeURI(t.getAttribute("href")).replace("#",""));return t.addEventListener("click",e=>{e.preventDefault(),window.scrollTo({top:n.offsetTop+100,behavior:"smooth"})}),n});!function n(o){o=Math.floor(o+1e4);let r=new IntersectionObserver((r,c)=>{let i=document.documentElement.scrollHeight+100;if(i>o)return c.disconnect(),void n(i);let l=function(e){let n=0,o=e[n];if(o.boundingClientRect.top>0)return n=t.indexOf(o.target),0===n?0:n-1;for(;n<e.length;n++){if(!(e[n].boundingClientRect.top<=0))return t.indexOf(o.target);o=e[n]}return t.indexOf(o.target)}(r);!function(e){if(e.classList.contains("active-current"))return;document.querySelectorAll(".toc .active").forEach(e=>{e.classList.remove("active","active-current")}),e.classList.add("active","active-current");let t=e.parentNode;for(;!t.matches(".toc");)t.matches("li")&&t.classList.add("active"),t=t.parentNode}(e[l])},{rootMargin:o+"px 0px -100% 0px",threshold:0});t.forEach(e=>{e&&r.observe(e)})}(document.documentElement.scrollHeight)}document.addEventListener("DOMContentLoaded",listennSidebarTOC),document.addEventListener("pjax:success",listennSidebarTOC)</script><script>"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then((function(e){e.onupdatefound=function(){var r=e.installing;r.onstatechange=function(){switch(r.state){case"installed":navigator.serviceWorker.controller?console.log("Updated serviceWorker."):console.log("serviceWorker Sucess!");break;case"redundant":console.log("The installing service worker became redundant.")}}}})).catch((function(e){console.log("Error during service worker registration:",e)}))</script><script src="https://cdn.jsdelivr.net/npm/pjax@0.2.8/pjax.min.js"></script><div class="pjax-animate"><script src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js"></script><div id="loading-bar-wrapper"><script>NProgress.configure({parent:"#loading-bar-wrapper",trickleSpeed:100})</script></div><script>window.ShowLoading=function(){NProgress.start()},window.HideLoading=function(){NProgress.done()}</script><script>volantis.pjax.push(window.HideLoading,"HideLoading"),volantis.pjax.send(window.ShowLoading,"ShowLoading"),volantis.pjax.error(window.HideLoading,"HideLoading")</script></div><script>var pjax;document.addEventListener("DOMContentLoaded",(function(){pjax=new Pjax({elements:'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([pjax-fancybox])',selectors:["title","#pjax-container","#pjax-header-nav-list"],cacheBust:!1,timeout:5e3})})),document.addEventListener("pjax:send",(function(e){try{var n=window.location.pathname,t=e.triggerElement.href,o=[""];""!=o[0]&&o.forEach(e=>{-1==n.indexOf(e)&&-1==t.indexOf(e)||(window.location.href=t)})}catch(e){}window.subData=null,volantis.$switcher.removeClass("active"),volantis.$header.removeClass("z_search-open"),volantis.$wrapper.removeClass("sub"),volantis.$topBtn.unbind("click"),$(".menu a").unbind("click"),$(window).unbind("resize"),$(window).unbind("scroll"),$(document).unbind("scroll"),$(document).unbind("click"),$("body").unbind("click"),volantis.pjax.method.send.start()})),document.addEventListener("pjax:complete",(function(){$(".nav-main").find(".list-v").not(".menu-phone").removeAttr("style",""),$(".menu-phone.list-v").removeAttr("style",""),$("script[data-pjax], .pjax-reload script").each((function(){$(this).parent().append($(this).remove())}));try{volantis.pjax.method.complete.start()}catch(e){console.log(e)}})),document.addEventListener("pjax:error",(function(e){volantis.pjax.method.error.start(),window.location.href=e.triggerElement.href}))</script></div></body></html>